package gl.android.swig.jni;


public class runme {

  static {
    try {
	System.loadLibrary("SWIGANDROID");
    } catch (UnsatisfiedLinkError e) {
      System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
      System.exit(1);
    }
  }

  public static void main(String argv[]) {
    String s = "brave new world";
    example.f1(s);
    System.out.println("f1(String): " + s);

    byte b[] = new byte[25];
    example.f2(b);
    System.out.println("f2(byte[]): " + new String(b));

    StringBuffer sb = new StringBuffer(20);
    example.f3(sb);
    System.out.println("f3(StringBuffer): " + sb);
    final byte[] bytes = new byte[1024];
    for (int i = 0; i < bytes.length; i++) {
        bytes[i] = (byte) i;
    }
    example.setByteArray(bytes,bytes.length);
    CByteArray_t cByteArray_t = new CByteArray_t();
    final byte[] bytes2 = new byte[1024];
    for (int i = 0; i < bytes2.length; i++) {
        bytes2[i] = (byte) i;
    }
    cByteArray_t.setBYTE(bytes2);
    cByteArray_t.setLen(bytes2.length);
    example.setCByteArray(cByteArray_t);
  }
}
